<?php
namespace BP\Sys;

use BP\En\EntityMyPK;

require_once("BP/En/Map.php");
class FrmBtn extends EntityMyPK {
	public function getGroupID () 
	{
		return $this->GetValIntByKey(FrmBtnAttr::$GroupID);
	}
	public function setGroupID ($value) // [long value]
	{
		$this->SetValByKey(FrmBtnAttr::$GroupID, $value);
	}
	public function getMsgOK () 
	{
		return $this->GetValStringByKey(FrmBtnAttr::$MsgOK);
	}
	public function setMsgOK ($value) // [String value]
	{
		$this->SetValByKey(FrmBtnAttr::$MsgOK, $value);
	}
	public function getMsgErr () 
	{
		return $this->GetValStringByKey(FrmBtnAttr::$MsgErr);
	}
	public function setMsgErr ($value) // [String value]
	{
		$this->SetValByKey(FrmBtnAttr::$MsgErr, $value);
	}
	public function getEventContext () 
	{
		return $this->GetValStringByKey(FrmBtnAttr::$EventContext)->replace("#", "@");
	}
	public function setEventContext ($value) // [String value]
	{
		$this->SetValByKey(FrmBtnAttr::$EventContext, $value);
	}
	public function getIsViewHtml () 
	{
		return PubClass::ToHtmlColor($this->getIsView());
	}
	public function getIsView () 
	{
		return $this->GetValStringByKey(FrmBtnAttr::$IsView);
	}
	public function setIsView ($value) // [String value]
	{
		switch ($value) {
			case "#FF000000":
				$this->SetValByKey(FrmBtnAttr::$IsView, "Red");
				return ;
			default:
				break;
		}
		$this->SetValByKey(FrmBtnAttr::$IsView, $value);
	}
	public function getUACContext () 
	{
		return $this->GetValStringByKey(FrmBtnAttr::$UACContext);
	}
	public function setUACContext ($value) // [String value]
	{
		$this->SetValByKey(FrmBtnAttr::$UACContext, $value);
	}
	public function getUAC () 
	{
		return $this->GetValBooleanByKey(FrmBtnAttr::$UAC);
	}
	public function setUAC ($value) // [boolean value]
	{
		$this->SetValByKey(FrmBtnAttr::$UAC, $value);
	}
	public function getIsEnable () 
	{
		return $this->GetValBooleanByKey(FrmBtnAttr::$IsEnable);
	}
	public function setIsEnable ($value) // [boolean value]
	{
		$this->SetValByKey(FrmBtnAttr::$IsEnable, $value);
	}
	public function getY () 
	{
		return $this->GetValFloatByKey(FrmBtnAttr::$Y);
	}
	public function setY ($value) // [float value]
	{
		$this->SetValByKey(FrmBtnAttr::$Y, $value);
	}
	public function getX () 
	{
		return $this->GetValFloatByKey(FrmBtnAttr::$X);
	}
	public function setX ($value) // [float value]
	{
		$this->SetValByKey(FrmBtnAttr::$X, $value);
	}
	public function getHisBtnEventType () 
	{
		return BtnEventType->forValue($this->GetValIntByKey(FrmBtnAttr::$EventType));
	}
	public function getEventType () 
	{
		return $this->GetValIntByKey(FrmBtnAttr::$EventType);
	}
	public function setEventType ($value) // [int value]
	{
		$this->SetValByKey(FrmBtnAttr::$EventType, $value);
	}
	public function getFK_MapData () 
	{
		return $this->GetValStrByKey(FrmBtnAttr::$FK_MapData);
	}
	public function setFK_MapData ($value) // [String value]
	{
		$this->SetValByKey(FrmBtnAttr::$FK_MapData, $value);
	}
	public function getText () 
	{
		return $this->GetValStrByKey(FrmBtnAttr::$Text);
	}
	public function setText ($value) // [String value]
	{
		$this->SetValByKey(FrmBtnAttr::$Text, $value);
	}
	public function getTextHtml () 
	{
		return $this->GetValStrByKey(FrmBtnAttr::$Text)->replace("@", "<br>");
	}
	public static function constructor__ () 
	{
		$me = new self();
		return $me;
	}
	public static function constructor__String ($mypk) // [String mypk]
	{
		$me = new self();
		$me->setMyPK($mypk);
		$me->Retrieve();
		return $me;
	}
	public function getEnMap () 
	{
		if (($this->get_enMap() != NULL))
		{
			return $this->get_enMap();
		}
		$map = new Map("Sys_FrmBtn", "按钮");
		$map->Java_SetDepositaryOfEntity($Depositary->None);
		$map->Java_SetDepositaryOfMap($Depositary->Application);
		$map->Java_SetEnType($EnType->Sys);
		$map->IndexField = FrmBtnAttr::$FK_MapData;
		$map->AddMyPK();
		$map->AddTBString(FrmBtnAttr::$FK_MapData, NULL, "表单ID",  TRUE ,  FALSE , 1, 100, 20);
		$map->AddTBString(FrmBtnAttr::$Text, NULL, "标签",  TRUE ,  FALSE , 0, 3900, 20);
		$map->AddTBFloat(FrmBtnAttr::$X, 5, "X",  TRUE ,  FALSE );
		$map->AddTBFloat(FrmBtnAttr::$Y, 5, "Y",  FALSE ,  FALSE );
		$map->AddTBInt(FrmBtnAttr::$IsView, 0, "是否可见",  FALSE ,  FALSE );
		$map->AddTBInt(FrmBtnAttr::$IsEnable, 0, "是否起用",  FALSE ,  FALSE );
		$map->AddTBInt(FrmBtnAttr::$UAC, 0, "控制类型",  FALSE ,  FALSE );
		$map->AddTBString(FrmBtnAttr::$UACContext, NULL, "控制内容",  TRUE ,  FALSE , 0, 3900, 20);
		$map->AddTBInt(FrmBtnAttr::$EventType, 0, "事件类型",  FALSE ,  FALSE );
		$map->AddTBString(FrmBtnAttr::$EventContext, NULL, "事件内容",  TRUE ,  FALSE , 0, 3900, 20);
		$map->AddTBString(FrmBtnAttr::$MsgOK, NULL, "运行成功提示",  TRUE ,  FALSE , 0, 500, 20);
		$map->AddTBString(FrmBtnAttr::$MsgErr, NULL, "运行失败提示",  TRUE ,  FALSE , 0, 500, 20);
		$map->AddTBString(FrmBtnAttr::$BtnID, NULL, "按钮ID",  TRUE ,  FALSE , 0, 128, 20);
		$map->AddTBInt(FrmBtnAttr::$GroupID, 0, "�?在分�?",  FALSE ,  FALSE );
		$this->set_enMap($map);
		return $this->get_enMap();
	}
}
?>
